package client.messageContent;

import common.SerializationManager;
import common.data.CloseAccountArgs;
import common.interfaces.MessageContent;

public class CloseAccountMsgContent extends CloseAccountArgs implements MessageContent{
	private byte[] data;
	private int length;
	
	public CloseAccountMsgContent(String holderName, long accountNumber, String password) {
		this.holderName = holderName;
		this.accountNumber = accountNumber;
		this.password = password;
	}
	
	@Override
	public byte[] getByte(){
		try {
			data = SerializationManager.getCurrent().fromObject(this);
		} catch (IllegalArgumentException | IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return data;		
	}

	@Override
	public int getLength() {
		// TODO Auto-generated method stub
		return this.length;
	}

}
